<div ng-controller="tagAddCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h4 class="m-n font-thin">添加标签</h4>
        <button onClick="javascript:history.go(-1)" class="btn-back btn btn-dark btn-sm btn-rounded">
            返回
        </button>
    </div>
    <div class="wrapper-md">
        <div class="panel-body panel">
            <div class="m-b-sm">
                <div class="padder-md padder-v bg-light m-b-sm">
                    <span class="font-bold">标签信息</span>
                </div>
                <form name="tag" ng-submit="add()">
                    <div class="form-horizontal form-validation">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">标签名</label>
                            <div class="col-sm-4">
                                <input type="text" name="name" ng-model="tagService.tag.name" class="form-control m-b-xs" placeholder="请输入标签名" required>
                                <div ng-if="goodsForm.name.$touched">
                                    <p ng-if="goodsForm.name.$error.required" class="text-danger h6">标签名是必需的</p>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">标签描述</label>
                            <div class="col-sm-4">
                                <input type="text" name="hint" ng-model="tagService.tag.describe" class="form-control m-b-xs" maxlength="120" placeholder="请输入标签提示" required>
                                <div ng-if="goodsForm.hint.$touched">
                                    <p ng-if="goodsForm.hint.$error.required" class="text-danger h6">标签描述是必需的</p>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-1 control-label">标签类型</label>
                            <div class="col-sm-4">
                                <div class="inline m-r-xs">
                                    <div class="radio inline m-r-n">
                                        <label class="i-checks i-checks-sm">
                                            <input type="radio" name="type" ng-model="tagService.tag.type" value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <p class="font-bold inline m-n">商品</p>
                                    <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="商品" popover-trigger="mouseenter"></i>
                                </div>
                                <!--<div class="inline m-r-xs">-->
                                    <!--<div class="radio inline m-r-n">-->
                                        <!--<label class="i-checks i-checks-sm">-->
                                            <!--<input type="radio" name="type" ng-model="tagService.tag.type" value="1">-->
                                            <!--<i></i>-->
                                        <!--</label>-->
                                    <!--</div>-->
                                    <!--<p class="font-bold inline m-n">店铺</p>-->
                                    <!--<i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="店铺" popover-trigger="mouseenter"></i>-->
                                <!--</div>-->
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-1 control-label">目标类型</label>
                            <div class="col-sm-4">
                                <div class="inline m-r-xs">
                                    <div class="radio inline m-r-n">
                                        <label class="i-checks i-checks-sm">
                                            <input type="radio" name="target" ng-model="tagService.tag.target" value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <p class="font-bold inline m-n">标志</p>
                                    <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="标志" popover-trigger="mouseenter"></i>
                                </div>
                                <div class="inline m-r-xs">
                                    <div class="radio inline m-r-n">
                                        <label class="i-checks i-checks-sm">
                                            <input type="radio" name="target" ng-model="tagService.tag.target" value="1">
                                            <i></i>
                                        </label>
                                    </div>
                                    <p class="font-bold inline m-n">活动</p>
                                    <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="活动" popover-trigger="mouseenter"></i>
                                </div>
                                <div class="inline m-r-xs">
                                    <div class="radio inline m-r-n">
                                        <label class="i-checks i-checks-sm">
                                            <input type="radio" name="target" ng-model="tagService.tag.target" value="2">
                                            <i></i>
                                        </label>
                                    </div>
                                    <p class="font-bold inline m-n">服务</p>
                                    <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="服务" popover-trigger="mouseenter"></i>
                                </div>
                                <div class="inline m-r-xs">
                                    <div class="radio inline m-r-n">
                                        <label class="i-checks i-checks-sm">
                                            <input type="radio" name="target" ng-model="tagService.tag.target" value="3">
                                            <i></i>
                                        </label>
                                    </div>
                                    <p class="font-bold inline m-n">承诺</p>
                                    <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="承诺" popover-trigger="mouseenter"></i>
                                </div>
                            </div>
                        </div>

                        <div class="b-t">
                            <div class="col-sm-4 padder-v col-sm-offset-2">
                                <button type="submit" class="btn btn-success"  ng-disabled="tag.$invalid"  ng-if="!addState">添加</button>
                                <div class="btn btn-success" ng-if="addState" disabled>保存中..</div>
                            </div>
                        </div>


                    </div>
                </form>

            </div>
        </div>
    </div>
</div>